// Nozzle.cpp: implementation of the Nozzle class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Nozzle.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

Nozzle::Nozzle()
{
	this->m_dDiameter = 40;
}

Nozzle::~Nozzle()
{

}

double Nozzle::GetDiameter()
{
	return this->m_dDiameter;

}
AcGePoint3d& Nozzle::GetFixPos()
{
	return this->m_FixPos ;

}

void Nozzle::SetFixPos(AcGePoint3d &Pos)
{
	this->m_FixPos = Pos;

}

inline void Nozzle::SetDiameter(const double d)
{
	this->m_dDiameter = d;
}

inline void Nozzle::SetEndType(const StdString& strEndType)
{
	this->m_strEndType = strEndType;
}

inline StdString& Nozzle::GetEndType()
{
	return this->m_strEndType;
}

inline void Nozzle::SetRank(const StdString& strRank)
{
	this->m_strRank = strRank;
}

inline StdString& Nozzle::GetRank()
{
	return this->m_strRank;
}

inline AcGeMatrix3d& Nozzle::GetTransformMatrix()
{
	return this->m_mtTransform;
}

inline void Nozzle::SetTransformMatrix(const AcGeMatrix3d& xform)
{
	this->m_mtTransform = xform;
}

void Nozzle::TransformBy(const AcGeMatrix3d &mtForm)
{
	m_FixPos = mtForm*m_FixPos;
	m_mtTransform = mtForm;
	SetTransform();
	Notify();
}

inline void Nozzle::NotifyCreate()
{
	this->SetCreate();
	this->Notify();
}

inline void Nozzle::NotifyDelete()
{
	if (this->IsDeleteState())
	{
		return ;
	}
	
	this->SetDelete();
	this->Notify();
}

inline void Nozzle::NotifyModifyGeo()
{
	this->SetModifyGeo();
	this->Notify();
}

inline void Nozzle::NotifyModifyPrj()
{
	this->SetModifyPrj();
	this->Notify();
}

inline void Nozzle::SetNozzleID(const StdString &strID)
{
	this->m_strNozzleID = strID;
}

inline StdString& Nozzle::GetNozzleID() const
{	
	return const_cast<StdString&>(this->m_strNozzleID);
}

inline void Nozzle::SetHeatPreserveType(const StdString &strType)
{
	this->m_strHeatPreserveType = strType;
}



inline StdString& Nozzle::GetHeatPreserveType() const
{
	return const_cast<StdString&>(this->m_strHeatPreserveType);
}


inline void Nozzle::SetPipeID(const StdString &strID)
{
	this->m_strPipeID = strID;
}

inline StdString& Nozzle::GetPipeID() const
{
	return const_cast<StdString&>(this->m_strPipeID);
}

inline void Nozzle::SetNozzleName(const StdString &strName)
{
	this->m_strNozzleName = strName;
}



inline StdString& Nozzle::GetNozzleName() const
{
	return const_cast<StdString&>(this->m_strNozzleName);
}
